#include <stdio.h>
#include <stdlib.h>
#include <string.h>

typedef struct island {
  char *name;
  char *opens;
  char *closes;
  struct island *next;
} island;

island amity = {"Amity", "09:00", "17:00", NULL};
island craggy = {"Craggy", "09:00", "17:00", NULL};
island isla_nublar = {"Foggy", "09:00", "17:00", NULL};
island shutter = {"Shutter", "09:00", "17:00", NULL};
island skull = {"Skull", "09:00", "17:00", NULL};

island* create (char *name)
{
  island *i = malloc(sizeof(island));
  i->name = strdup(name);
  i->opens = "09:00";
  i->closes= "17:00";
  i->next=NULL;

  return i;
}

void release(island *start)
{
  island *i = start;
  island *next = NULL;
  for (; i != NULL; i = next)
  {
    next = i->next;
    free(i->name);
    free(i);
  }
}

void display ( island *start )
{
  island *i = start;

  for (;i != NULL; i = i->next)
  {
    printf("Name: %sOpen: %s-%s\n", i->name, i->opens, i->closes);
  }
}

int main ()
{
  island *start = NULL;
  island *i = NULL;
  island *next = NULL;
  char name[80];
  for (; fgets(name, 80, stdin) != NULL; i = next)
  {
    next = create(name);
    if (start == NULL)
      start = next;
    if (i != NULL)
      i->next = next;
  }

  display(start);
  release(start);
}